<% content_for :content do %>

  <!-- widget grid -->
  <section id="widget-grid" class="">
    <!-- row -->
    <div class="row">
  
      <!-- NEW WIDGET START -->
      <article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        
        <!-- Widget ID (each widget will need unique ID)-->
        <div class="jarviswidget jarviswidget-color-blueDark" id="wid-id-3" data-widget-editbutton="false" data-widget-colorbutton="false" data-widget-deletebutton="false">
          <!-- widget options:
          usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
  
          data-widget-colorbutton="false"
          data-widget-editbutton="false"
          data-widget-togglebutton="false"
          data-widget-deletebutton="false"
          data-widget-fullscreenbutton="false"
          data-widget-custombutton="false"
          data-widget-collapsed="true"
          data-widget-sortable="false"
  
          -->
          <header>
            <span class="widget-icon"> <i class="fa fa-table"></i> </span>
            <h2>推荐历史记录</h2>
  
          </header>
  
          <!-- widget div-->
          <div>
  
            <!-- widget edit box -->
            <div class="jarviswidget-editbox">
              <!-- This area used as dropdown edit box -->
  
            </div>
            <!-- end widget edit box -->
  
            <!-- widget content -->
            <div class="widget-body no-padding">
              <div class="widget-body-toolbar">
                
              </div>

              <table id="datatable_tabletools" class="table table-striped table-hover vertical-align-middle">
                <thead>
                  <tr>
                    <th>#</th>
                    <th>起始日期</th>
                    <th>相隔天数</th>
                    <th>保级推荐数</th>
                    <th>升级推荐数</th>
                    <th>创建时间</th>
                  </tr>
                </thead>
                <tbody>
                <% @recommand_histories.each_with_index do |item,index| %>
                  <tr id='item-<%= item.id %>'>
                    <td>
                      <%= index + 1 %>
                    </td>
                    <td><%= item.from_day %></td>
                    <td><%= item.gap_days %></td>
                    <td><%= item.level_stay %></td>
                    <td><%= item.level_promotion %></td>
                    <td><%= item.created_at.strftime('%Y-%m-%d %H:%M:%S') %></td>
                  </tr>
                <% end %>
                </tbody>
              </table>
  
            </div>
            <!-- end widget content -->
  
          </div>
          <!-- end widget div -->
  
        </div>
        <!-- end widget -->
  
      </article>
      <!-- WIDGET END -->
  
    </div>
  
    <!-- end row -->
  
  </section>
  <!-- end widget grid -->
<% end %>

<% content_for :js do %>
<% end %>